-- @owner: @taoying
-- @date: 2025-09-17
-- @testpoint: object_id函数测试，部分合理报错
-- @modify: 

--step1:连接兼容D库创建数据库
@conn PrimaryDbDmode;
--step2:删除插件
create extension if not exists shark;
--step3:执行测试
CREATE OR REPLACE FUNCTION get_user_age(birth_date DATE)
RETURNS INT AS $$
BEGIN
RETURN (EXTRACT(YEAR FROM CURRENT_DATE) - EXTRACT(YEAR FROM birth_date))::INT;
END;
$$ LANGUAGE plpgsql;
/
Select object_id('sys.get_user_age');
Select object_id('get_user_age', 'FN');
Select object_id('sys.get_user_age');
Select object_id(,'FN');
Select object_id('FN');
Select object_id('get_user_age');
Select object_id('user_log','PK');
--step4:清理环境
DROP FUNCTION if exists get_user_age(birth_date DATE);